/*
 * debug.h
 *
 *  Created on: 2013-3-14
 *      Author: root
 */

#ifndef DEBUG_H_
#define DEBUG_H_

#include <stdio.h>
#define DEBUG
#ifdef DEBUG
#define DBG(...) fprintf(stderr, " DBG(%s, %s(), %d): ", __FILE__, __FUNCTION__, __LINE__); fprintf(stderr, __VA_ARGS__)
#else
#define DBG(...)
#endif


#define DEBUGS
#ifdef DEBUGS
#define DBGS(...) fprintf(stderr, "(%d): ", __LINE__); fprintf(stderr, __VA_ARGS__);fprintf(stderr, "\n");
#else
#define DBGS(...)
#endif

//#define DEBUGMYSQL
#ifdef DEBUGMYSQL
#define DBGMYSQL(...) fprintf(stderr, "(%d): ", __LINE__); fprintf(stderr, __VA_ARGS__);fprintf(stderr, "\n");
#else
#define DBGMYSQL(...)
#endif

#endif /* DEBUG_H_ */
